﻿@using WFramework.MvcPager
@using MiniWeb.Core.Entities

@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@model PagedList<Links>
<link href="../../Scripts/colorbox/colorbox.css" rel="stylesheet" type="text/css" />
<link href="../../Scripts/colorbox/colorbox.css" rel="stylesheet" type="text/css" />
<script src="../../Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="../../Scripts/colorbox/jquery.colorbox-min.js" type="text/javascript"></script>
<script src="../../Scripts/AdminCommon.js" type="text/javascript"></script>
<script src="../../Scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $(".box").colorbox({
            iframe: true,
            width: 900,
            height: 850,
            onClosed: function () {
                window.location.reload();
            }
        });

        $("#btnsubmit").click(function () {
            $("#form1").submit();
        });
    });

  
</script>
<div class="right_box_card">
    <ul>
        <li class="right_box_card1"><a href=" ">友情链接表管理</a></li>
    </ul>
</div>
<div style="line-height: 40px;">
    <p class="avatar_btn">
        <a href="@Url.Action("Save", "linksManager")" class="box" id="linkAdd">新增</a>
    </p>
</div>
<form action="@Url.Action("List","LinksManager")" method="GET" id="form1">
    <div>
        <input id ="Lname" name="linkName" type="text" value="@ViewData["linkName"]"/>
        <input type="button" value="查找"  id="btnsubmit"/>
    </div>
</form>
<div>

        <table class="right_box_tab" style="margin-top: 10px;" width="100%" border="0" cellspacing="0"
                cellpadding="0">
            <tr height="30" class="tab_title">
                <td>
                    ID
                </td>
                <td>
                    链接名称
                </td>
                <td>
                    链接地址
                </td>
                <td>
                    操作
                </td>
            </tr>

            
            @foreach(var item in Model)
            {
            <tr height="35" class="tab_td1">    
                 <td>
                    @item.ID
                </td>
                <td>
                    @item.linkName
                </td>
                <td>
                   @item.linkAddress
                </td>

                <td>
                    @Html.ActionLink("修改", "Save", "LinksManager", new { id = item.ID }, new { @class="box"})
                    <a href="#" onclick="DeletePost('/LinksManager/Delete', { id: @item.ID}) ">删除</a>
                </td>
            </tr>
            }
                
       
    </table>

</div>
